<template>
    <div>
        <span>{{ childValue }}</span>
        <button @click="addFn()"></button>
    </div>
</template>

<script>
    export default {
        name:'Ceshi',
        data() {
            return {
               childValue: "我是子组件的数据"
            }
        },
        methods: {
            addFn() {
                this.$emit("titleChange", this.childValue)
            }
        },
    }
</script>

<style lang="scss" scoped>

</style>